using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Mbs;
using Mbs.Elements;
using Mbs.Windows;
using Mbs.ComponentModel.Container;

namespace Shell.Module
{
    [Component]
    public partial class ShellForm : FormView
    {
        public ShellForm()
        {
            InitializeComponent();
        }


        public override IEnumerator<IDisposable> Attach()
        {
            yield return CommandNames.Exit.Command().Attach(this, "FormClosed");
        }

        public override void InitializeResource()
        {
            Text = StringParser.Parse("${res:Mbs.Framework.Sample}");
        }

        public override void Init()
        {
            Controls.Add(this.BuildItem<ToolStrip>(AddInItems.Shell_ToolBar));
            MainMenuStrip = this.BuildItem<MenuStrip>(AddInItems.Shell_MainMenu);
            if (MainMenuStrip != null)
                Controls.Add(MainMenuStrip);
           
        }
    }
}